package com.vst.orm.dao.hibernate.original;

import java.io.Serializable;
import java.util.List;
import org.hibernate.NonUniqueResultException;

import com.vst.orm.search.ExampleOptions;
import com.vst.orm.search.Filter;
import com.vst.orm.search.ISearch;
import com.vst.orm.search.SearchResult;

public abstract interface GeneralDAO {
	public abstract void create(Object paramObject);

	public abstract boolean createOrUpdate(Object paramObject);

	public abstract boolean deleteById(Class<?> paramClass, Serializable paramSerializable);

	public abstract boolean deleteEntity(Object paramObject);

	public abstract <T> T fetch(Class<T> paramClass, Serializable paramSerializable);

	public abstract <T> List<T> fetchAll(Class<T> paramClass);

	public abstract void update(Object paramObject);

	public abstract List search(ISearch paramISearch);

	public abstract int count(ISearch paramISearch);

	public abstract SearchResult searchAndCount(ISearch paramISearch);

	public abstract Object searchUnique(ISearch paramISearch) throws NonUniqueResultException;

	public abstract void flush();

	public abstract boolean isConnected(Object paramObject);

	public abstract void refresh(Object paramObject);

	public abstract Filter getFilterFromExample(Object paramObject);

	public abstract Filter getFilterFromExample(Object paramObject, ExampleOptions paramExampleOptions);
}
